.TH E1432_SET_AVG_UPDATE 3 E1432
.SH NAME
.nf
e1432_set_avg_update \- Set average update rate
e1432_get_avg_update \- Get average update rate
.fi
.IX e1432_set_avg_update(3) 3
.IX e1432_get_avg_update(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_avg_update(E1432ID hw, SHORTSIZ16 ID,
                               SHORTSIZ16 update)
SHORTSIZ16 e1432_get_avg_update(E1432ID hw, SHORTSIZ16 ID,
                               SHORTSIZ16 *update)
.cE
.SH DESCRIPTION
\fIe1432_set_avg_update\fR sets the update rate of intermediate results of
an ongoing average. At this time
averaging is only allowed on the frequency data that results from the FFT 
calculations which are turned on using \fIe1432_set_calc_data\fR 
with the \fBE1432_DATA_FREQ\fR parameter.  Averaging allows the data from multiple 
scans to be averaged together before being uploaded to the host computer.
This method both reduces noise on the data and reduces the amount of data
uploaded to the host.  The averaging method is set with the 
\fIe1432_set_avg_mode\fR function.  The total number of scan in an average is
controlled by \fIe1432_set_avg_number\fR.

Although averaging is performed only on frequency data, it is still
possible to read time data out of the module when averaging is taking
place.  Whenever frequency data is made available to the host (as
controlled by \fIe1432_set_avg_update\fR), time data is also made
available.  The time data is not averaged, it is just the most recent
time block (the block corresponding to the last frequency block that
was averaged into the average results).

\fIe1432_get_avg_update\fR returns the average update rate.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_updates\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIupdate\fR selects the update rate to the host 
of intermediate results in an average.
A value of 1 means every intermediate result is sent to the host, 2 means every
other result, 3 means every third result, etc.  The final result in an
ongoing average is always sent to the host even if is not a multiple of the
update rate.

\fBNOTE:  the number of the averaged frequency data points for the sum of squares 
modes
are one half that of the un-averaged and E1432_AVG_LIN updates, since the real 
and imaginary components are combined to form a single magnitude update.  Instead 
of BLOCKSIZE points, the magnitude squared updates will only have BLOCKSIZE/2 
points.\fR

.SH "RESET VALUE"
After a reset, \fIupdate\fR is set to \fB1\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error update otherwise.
.SH "SEE ALSO"
.na
e1432_set_avg_mode, e1432_set_avg_number, e1432_set_avg_weight, 
e1432_set_calc_data
.ad
